package com.tdrc.common.controller;

import com.tdrc.common.util.ServletUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * @author dpf
 * @version 1.0
 * @date 2020-4-22 16:42
 * @instruction 控制类基础类，包含控制类常用的方法
 */
public class BaseController {
    protected final Logger logger = LoggerFactory.getLogger(BaseController.class);
    /**
     * 获取request
     */
    public HttpServletRequest getRequest()
    {
        return ServletUtils.getRequest();
    }

    /**
     * 获取response
     */
    public HttpServletResponse getResponse()
    {
        return ServletUtils.getResponse();
    }

    /**
     * 获取session
     */
    public HttpSession getSession()
    {
        return getRequest().getSession();
    }

}
